<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>旋转木马</title>
  <link rel="stylesheet" href="../../0.常用/source/reset.css">
  <style>


    @keyframes run {
      from {
        transform: rotateY(0deg);
      }
      to {
        transform: rotateX(360deg) rotateY(360deg);
      }
    }

    body{
      perspective: 500px;
    }
    .container{
      height: 300px;
      width: 1000px;
      margin: 100px auto;
      border: 1px solid;
      
      
    }
    .container ul{
      height: 100%;
      width: 100%;
      transform-style: preserve-3d;
      position: relative;
      animation: run 8s linear infinite ;
    }
    .container ul:hover{
      animation-play-state: paused;
    }
    .container ul li{
      height: 150px;
      width: 150px;
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      margin: auto;
      
    }
    .img{
      height: 150px;
      width: 150px;
    }
    .img img{
      display: block;
      height: 150px;
      width: 150px;
      object-fit: cover;
    }

    .container ul li:nth-of-type(1){
      transform:  rotateY(0deg) translateZ(200px);
    }
   
    .container ul li:nth-of-type(2){
      transform:  rotateY(60deg) translateZ(200px);
    }

    .container ul li:nth-of-type(3){
      transform:  rotateY(120deg) translateZ(200px);
    }
    .container ul li:nth-of-type(4){
      transform:  rotateY(180deg) translateZ(200px);
    }

    .container ul li:nth-of-type(5){
      transform:  rotateY(240deg) translateZ(200px);
    }
    .container ul li:nth-of-type(6){
      transform:  rotateY(300deg) translateZ(200px);
    }
    

  </style>
</head>
<body>
  <div class="container">
    <ul>
      <li>
        <div class="img">
          <img src="../sources/imgs/图片2.jpg" alt="">
        </div>
      </li>
     <li>
        <div class="img">
          <img src="../sources/imgs/图片2.jpg" alt="">
        </div>
      </li>
       
      <li>
        <div class="img">
          <img src="../sources/imgs/图片2.jpg" alt="">
        </div>
      </li>
      
      <li>
        <div class="img">
          <img src="../sources/imgs/图片2.jpg" alt="">
        </div>
      </li>
      <li>
        <div class="img">
          <img src="../sources/imgs/图片2.jpg" alt="">
        </div>
      </li> 
      <li>
        <div class="img">
          <img src="../sources/imgs/图片2.jpg" alt="">
        </div>
      </li> 
    </ul>
  </div>
</body>
</html>